<?php

class myUser extends sfGuardSecurityUser
{
  public function getUserId()
  {
    if($this->isAuthenticated())
       return $this->getGuardUser()->getId();
    else
       return 0;
  }
  public function getResourceId()
  {
    if($this->isAuthenticated())
       return $this->getGuardUser()->getResource()->getResourceid();
    else
       return 0;
  }
  public function getResourceName()
  {
    if($this->isAuthenticated())
       return $this->getGuardUser()->getResource()->getName();
    else
       return 0;
  }
}
